IsDisplayingEquation Property

       

True if the equation for the trendline for the specified series is displayed on the chart (in the same data label as the R-squared value). The default value is True. Read/write Boolean.

expression.IsDisplayingEquation

expression   Required. An expression that returns a ChTrendline object.

Example

This example adds a trendline to the specified series. Only the trendline equation is displayed.


Sub AddTrendLine()
    Dim trndline
    
    ' Add a trendline to the first series in the first chart in ChartSpace1.
    Set trndline = ChartSpace1.Charts(0).SeriesCollection(0).Trendlines.Add
    
    ' Set the font of the trendline to bold.
    trndline.DataLabel.Font.Bold = True
    
    ' Do not display the R-Squared value with the trendline.
    trndline.IsDisplayingRSquared = False
    
    ' Display the equation for the trendline.
    trndline.IsDisplayingEquation = True
End Sub